@import './theme/default.less';

.zent-form {
  margin-bottom: 30px;
  width: auto;

  select[readonly],
  textarea[readonly] {
    background-color: @theme-stroke-10;
    cursor: text;
  }
}

.zent-form__fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

.zent-form__legend {
  padding-bottom: 8px;
  margin-bottom: 20px;
  width: 100%;
  border-bottom: 1px solid @theme-stroke-7;
  font-size: 14px;
  font-weight: bold;
}

.zent-form__control-group {
  margin-bottom: 20px;

  &.has-error {
    .zent-form__control-label,
    .zent-form__error-desc,
    .zent-form__help-block {
      color: @theme-error-2;
    }
  }
}

.zent-form__static-value {
  padding-top: 5px;
  font-size: 14px;
  line-height: 18px;
  padding-bottom: 5px;
  word-break: break-all;
}

.zent-form__control-action {
  padding-top: 5px;
  display: inline-block;
  font-size: 14px;
  line-height: 18px;
}

.zent-form__required {
  margin-right: 6px;
  font-size: 16px;
  color: @theme-error-1;
  vertical-align: middle;
}

.zent-form__help-block,
.zent-form__error-desc,
.zent-form__help-desc,
.zent-form__notice-desc {
  line-height: 14px;
  font-size: 12px;
  margin-top: 10px;
  margin-bottom: 0;
  color: @theme-stroke-4;

  ul li {
    font-size: 12px;
    line-height: 12px;
  }

  a {
    color: @theme-primary-2;
  }

  &:empty {
    margin-top: 0 !important;
  }
}

.zent-form__notice-desc {
  background: @theme-warn-3;
  color: @theme-stroke-1;
  display: inline-block;
  padding: 5px;
}

.zent-form--horizontal {
  .zent-form__control-label {
    display: inline-block;
    width: 120px;
    font-size: 12px;
    line-height: 30px;
    text-align: right;
    vertical-align: top;

    & + .zent-form__controls {
      margin-left: 10px;
    }
  }

  .zent-form__controls {
    display: inline-block;
    word-break: break-all;
    vertical-align: top;
  }

  .zent-form__form-actions {
    padding: 0 0 0 130px;
    margin: 25px 0 10px;
    background: none;
    border: none;
  }

  .zent-form__checkbox-group {
    font-size: 0;
    line-height: 28px;
  }

  .zent-form__checkbox {
    line-height: 28px;
  }

  .zent-form__radio-group {
    line-height: 28px;
  }
}

.zent-form--inline {
  .zent-form__control-group {
    display: inline-block;
    line-height: 30px;
    margin-right: 20px;

    .zent-form__control-label {
      display: inline-block;
      font-size: 12px;
      vertical-align: top;

      & + .zent-form__controls {
        display: inline-block;
        margin-left: 10px;
      }
    }
  }
}

.zent-form--vertical {
  .zent-form__control-label {
    display: block;
    font-size: 12px;
    margin-bottom: 10px;
  }
}
